#!/bin/bash
project_path=/data/nginx/www/www.daived.com
new_project_path=/tmp/build.tar.gz

if [ -f $new_project_path ]; then
    rm -rf $project_path/*
    tar -zxvf /tmp/build.tar.gz -C $project_path/
    if [ $? = 0 ]; then
        cd $project_path
        mv build/* .
    fi
fi
